#!bin/bash

PATTERN_PATH=/mnt/e/project-pattern/
DEPLOY_PATH=$PATTERN_PATH/.environment/deploy

cd $PATTERN_PATH
git pull
cd $PATTERN_PATH/web

#打包前端项目
yarn
yarn build:prod

mkdir -p /project-pattern/web/
rm -rf /opt/web/dist/static/*
\cp -r $PATTERN_PATH/web/dist/* /opt/web/dist/
# \cp -r /mnt/e/project-pattern/web/dist/* /opt/web/dist/
cd $DEPLOY_PATH